# -*- coding: utf-8 -*- 

###########################################################################
## Python code generated with wxFormBuilder (version Apr 11 2012)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc
import wx.grid
import wx.wizard
import wx.calendar
from wx.lib.masked import TimeCtrl
from wxPython._controls import wxTE_PROCESS_TAB

###########################################################################
## Class LinuxAnalyser
###########################################################################

class LinuxAnalyser ( wx.Frame ):
	
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"LinuxAnalyser", pos = wx.DefaultPosition, size = wx.Size( 784,567 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_scrolledWindow1 = wx.ScrolledWindow( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow1.SetScrollRate( 5, 5 )
		bSizer4 = wx.BoxSizer( wx.VERTICAL )
		
		self.monitorings_grid = wx.grid.Grid( self.m_scrolledWindow1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		
		# Grid
		self.monitorings_grid.CreateGrid( 5, 4 )
		self.monitorings_grid.EnableEditing( False )
		self.monitorings_grid.EnableGridLines( False )
		self.monitorings_grid.EnableDragGridSize( False )
		self.monitorings_grid.SetMargins( 0, 0 )
		
		# Columns
		self.monitorings_grid.EnableDragColMove( False )
		self.monitorings_grid.EnableDragColSize( True )
		self.monitorings_grid.SetColLabelSize( 30 )
		self.monitorings_grid.SetColLabelValue( 0, u"Typ" )
		self.monitorings_grid.SetColLabelValue( 1, u"Przedmiot" )
		self.monitorings_grid.SetColLabelValue( 2, u"Status" )
		self.monitorings_grid.SetColLabelValue( 3, u"Zakończenie" )
		self.monitorings_grid.SetColLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE )
		
		# Rows
		self.monitorings_grid.EnableDragRowSize( True )
		self.monitorings_grid.SetRowLabelSize( 80 )
		self.monitorings_grid.SetRowLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE )
		
		# Label Appearance
		
		# Cell Defaults
		self.monitorings_grid.SetDefaultCellAlignment( wx.ALIGN_LEFT, wx.ALIGN_TOP )
		bSizer4.Add( self.monitorings_grid, 1, wx.ALL|wx.EXPAND, 0 )
		
		
		self.m_scrolledWindow1.SetSizer( bSizer4 )
		self.m_scrolledWindow1.Layout()
		bSizer4.Fit( self.m_scrolledWindow1 )
		bSizer2.Add( self.m_scrolledWindow1, 1, wx.EXPAND |wx.ALL, 0 )
		
		self.m_panel2 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer12 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_button2 = wx.Button( self.m_panel2, wx.ID_ANY, u"Wykres", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer12.Add( self.m_button2, 0, wx.ALL, 0 )
		
		
		self.m_panel2.SetSizer( bSizer12 )
		self.m_panel2.Layout()
		bSizer12.Fit( self.m_panel2 )
		bSizer2.Add( self.m_panel2, 0, wx.EXPAND |wx.ALL, 0 )
		
		
		self.SetSizer( bSizer2 )
		self.Layout()
		self.m_statusBar1 = self.CreateStatusBar( 1, wx.ST_SIZEGRIP, wx.ID_ANY )
		self.m_menubar2 = wx.MenuBar( 0 )
		self.m_menu2 = wx.Menu()
		self.m_menuItem4 = wx.MenuItem( self.m_menu2, wx.ID_ANY, u"Nowy", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu2.AppendItem( self.m_menuItem4 )
		
		self.m_menuItem5 = wx.MenuItem( self.m_menu2, wx.ID_ANY, u"Otwórz plik z logiem", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu2.AppendItem( self.m_menuItem5 )
		
		self.m_menuItem7 = wx.MenuItem( self.m_menu2, wx.ID_ANY, u"Zatrzymaj", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu2.AppendItem( self.m_menuItem7 )
		
		self.m_menu2.AppendSeparator()
		
		self.m_menuItem8 = wx.MenuItem( self.m_menu2, wx.ID_ANY, u"Zakończ", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu2.AppendItem( self.m_menuItem8 )
		
		self.m_menubar2.Append( self.m_menu2, u"Monitoring" ) 
		
		self.m_menu3 = wx.Menu()
		self.m_menuItem6 = wx.MenuItem( self.m_menu3, wx.ID_ANY, u"Informacje", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu3.AppendItem( self.m_menuItem6 )
		
		self.m_menubar2.Append( self.m_menu3, u"Pomoc" ) 
		
		self.SetMenuBar( self.m_menubar2 )
		
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		self.m_button2.Bind( wx.EVT_BUTTON, self.show_chart )
		self.Bind( wx.EVT_MENU, self.on_new, id = self.m_menuItem4.GetId() )
		self.Bind( wx.EVT_MENU, self.on_open, id = self.m_menuItem5.GetId() )
		self.Bind( wx.EVT_MENU, self.on_stop, id = self.m_menuItem7.GetId() )
		self.Bind( wx.EVT_MENU, self.on_exit, id = self.m_menuItem8.GetId() )
		self.Bind( wx.EVT_MENU, self.on_info, id = self.m_menuItem6.GetId() )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def show_chart( self, event ):
		event.Skip()
	
	def on_new( self, event ):
		event.Skip()
	
	def on_open( self, event ):
		event.Skip()
	
	def on_stop( self, event ):
		event.Skip()
	
	def on_exit( self, event ):
		event.Skip()
	
	def on_info( self, event ):
		event.Skip()
	

###########################################################################
## Class NewMonitoringWizard
###########################################################################

class NewMonitoringWizard ( wx.wizard.Wizard ):
	
	def __init__( self, parent ):
		wx.wizard.Wizard.__init__ ( self, parent, id = wx.ID_ANY, title = u"Nowy monitoring", bitmap = wx.NullBitmap, pos = wx.DefaultPosition, style = wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.RESIZE_BORDER|wx.FULL_REPAINT_ON_RESIZE )
		
		self.SetSizeHintsSz( wx.Size( 450,500 ), wx.Size( -1,-1 ) )
		self.m_pages = []
		
		self.m_wizPage1 = wx.wizard.WizardPageSimple( self  )
		self.add_page( self.m_wizPage1 )
		
		bSizer5 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText1 = wx.StaticText( self.m_wizPage1, wx.ID_ANY, u"Typ monitorowanego zasobu", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )
		bSizer5.Add( self.m_staticText1, 0, wx.ALL, 5 )
		
		self.monitorProcessWithName = wx.RadioButton( self.m_wizPage1, wx.ID_ANY, u"Procesy o nazwie", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer5.Add( self.monitorProcessWithName, 0, wx.ALL, 5 )
		
		self.processName = wx.TextCtrl( self.m_wizPage1, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer5.Add( self.processName, 0, wx.ALL, 5 )
		
		self.monitorProcessOfUser = wx.RadioButton( self.m_wizPage1, wx.ID_ANY, u"Procesy użytkownika", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer5.Add( self.monitorProcessOfUser, 0, wx.ALL, 5 )
		
		self.processOwner = wx.TextCtrl( self.m_wizPage1, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer5.Add( self.processOwner, 0, wx.ALL, 5 )
		
		
		self.m_wizPage1.SetSizer( bSizer5 )
		self.m_wizPage1.Layout()
		bSizer5.Fit( self.m_wizPage1 )
		self.m_wizPage2 = wx.wizard.WizardPageSimple( self  )
		self.add_page( self.m_wizPage2 )
		
		bSizer6 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText2 = wx.StaticText( self.m_wizPage2, wx.ID_ANY, u"Monitorowane zasoby", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		bSizer6.Add( self.m_staticText2, 0, wx.ALL, 5 )
		
		self.cpuUsage = wx.CheckBox( self.m_wizPage2, wx.ID_ANY, u"Zużycie procesora", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer6.Add( self.cpuUsage, 0, wx.ALL, 5 )
		
		bSizer10 = wx.BoxSizer( wx.HORIZONTAL )
		
		bSizer14 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_static100Text = wx.StaticText( self.m_wizPage2, wx.ID_ANY, u"Interwał", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_static100Text.Wrap( -1 )
		bSizer14.Add( self.m_static100Text, 0, wx.ALL, 5 )
		
		self.cpuThresholdText = wx.StaticText( self.m_wizPage2, wx.ID_ANY, u"Próg", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.cpuThresholdText.Wrap( -1 )
		bSizer14.Add( self.cpuThresholdText, 0, wx.ALL, 5 )
		
		
		bSizer10.Add( bSizer14, 1, wx.EXPAND, 5 )
		
		bSizer15 = wx.BoxSizer( wx.VERTICAL )
		
		self.cpuMonitoringInterval = wx.SpinCtrl( self.m_wizPage2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 0 )
		bSizer15.Add( self.cpuMonitoringInterval, 0, wx.ALL, 5 )
		
		self.cpuThreshold = wx.SpinCtrl( self.m_wizPage2, wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 )
		bSizer15.Add( self.cpuThreshold, 0, wx.ALL, 5 )
		
		
		bSizer10.Add( bSizer15, 1, wx.EXPAND, 5 )
		
		
		bSizer6.Add( bSizer10, 1, wx.EXPAND, 5 )
		
		self.ramUsage = wx.CheckBox( self.m_wizPage2, wx.ID_ANY, u"Zużycie pamięci", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer6.Add( self.ramUsage, 0, wx.ALL, 5 )
		
		bSizer11 = wx.BoxSizer( wx.HORIZONTAL )
		
		bSizer16 = wx.BoxSizer( wx.VERTICAL )
		
		self.ramMonitoringIntervalText = wx.StaticText( self.m_wizPage2, wx.ID_ANY, u"Interwał", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.ramMonitoringIntervalText.Wrap( -1 )
		bSizer16.Add( self.ramMonitoringIntervalText, 0, wx.ALL, 5 )
		
		self.m_staticText12 = wx.StaticText( self.m_wizPage2, wx.ID_ANY, u"Próg", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText12.Wrap( -1 )
		bSizer16.Add( self.m_staticText12, 0, wx.ALL, 5 )
		
		
		bSizer11.Add( bSizer16, 1, wx.EXPAND, 5 )
		
		bSizer17 = wx.BoxSizer( wx.VERTICAL )
		
		self.ramMonitoringInterval = wx.SpinCtrl( self.m_wizPage2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 0 )
		bSizer17.Add( self.ramMonitoringInterval, 0, wx.ALL, 5 )
		
		self.ramThreshold = wx.SpinCtrl( self.m_wizPage2, wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 )
		bSizer17.Add( self.ramThreshold, 0, wx.ALL, 5 )
		
		
		bSizer11.Add( bSizer17, 1, wx.EXPAND, 5 )
		
		
		bSizer6.Add( bSizer11, 1, wx.EXPAND, 5 )
		
		
		self.m_wizPage2.SetSizer( bSizer6 )
		self.m_wizPage2.Layout()
		bSizer6.Fit( self.m_wizPage2 )
		self.m_wizPage3 = wx.wizard.WizardPageSimple( self  )
		self.add_page( self.m_wizPage3 )
		
		self.m_wizPage3.SetMinSize( wx.Size( 400,400 ) )
		
		bSizer7 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText3 = wx.StaticText( self.m_wizPage3, wx.ID_ANY, u"Czas trwania monitoringu", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )
		bSizer7.Add( self.m_staticText3, 0, wx.ALL, 5 )
		
		self.userStop = wx.RadioButton( self.m_wizPage3, wx.ID_ANY, u"Zatrzymanie na żądanie użytkownika", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer7.Add( self.userStop, 0, wx.ALL, 5 )
		
		self.timeBoundaries = wx.RadioButton( self.m_wizPage3, wx.ID_ANY, u"Ustalony", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer7.Add( self.timeBoundaries, 0, wx.ALL, 5 )
		
		fgSizer2 = wx.FlexGridSizer( 3, 2, 0, 0 )
		fgSizer2.SetFlexibleDirection( wx.BOTH )
		fgSizer2.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText30 = wx.StaticText( self.m_wizPage3, wx.ID_ANY, u"Od", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText30.Wrap( -1 )
		fgSizer2.Add( self.m_staticText30, 0, wx.ALL, 5 )
		
		self.m_staticText31 = wx.StaticText( self.m_wizPage3, wx.ID_ANY, u"Do", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText31.Wrap( -1 )
		fgSizer2.Add( self.m_staticText31, 0, wx.ALL, 5 )
		
		self.startDate = wx.calendar.CalendarCtrl( self.m_wizPage3, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.calendar.CAL_SHOW_HOLIDAYS )
		fgSizer2.Add( self.startDate, 0, wx.ALL, 5 )
		
		self.stopDate = wx.calendar.CalendarCtrl( self.m_wizPage3, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.calendar.CAL_SHOW_HOLIDAYS )
		fgSizer2.Add( self.stopDate, 0, wx.ALL, 5 )
		
		self.startHour=TimeCtrl(
		self.m_wizPage3, id = -1,
		pos = wx.DefaultPosition,
		size = wx.DefaultSize,
		style = wxTE_PROCESS_TAB,
		validator = wx.DefaultValidator,
		name = "time",
		format = '24HHMMSS',
		fmt24hr = True,
		displaySeconds = True,
		spinButton = None,
		min = None,
		max = None,
		limited = None,
		oob_color = "Yellow"
		)
		fgSizer2.Add( self.startHour, 0, wx.ALL, 5 )
		
		self.stopHour=TimeCtrl(
		self.m_wizPage3, id = -1,
		pos = wx.DefaultPosition,
		size = wx.DefaultSize,
		style = wxTE_PROCESS_TAB,
		validator = wx.DefaultValidator,
		name = "time",
		format = '24HHMMSS',
		fmt24hr = True,
		displaySeconds = True,
		spinButton = None,
		min = None,
		max = None,
		limited = None,
		oob_color = "Yellow"
		)
		fgSizer2.Add( self.stopHour, 0, wx.ALL, 5 )
		
		
		bSizer7.Add( fgSizer2, 1, wx.EXPAND, 5 )
		
		
		self.m_wizPage3.SetSizer( bSizer7 )
		self.m_wizPage3.Layout()
		bSizer7.Fit( self.m_wizPage3 )
		self.m_wizPage5 = wx.wizard.WizardPageSimple( self  )
		self.add_page( self.m_wizPage5 )
		
		bSizer9 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText6 = wx.StaticText( self.m_wizPage5, wx.ID_ANY, u"Plik logów", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		bSizer9.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.logFilePicker = wx.FilePickerCtrl( self.m_wizPage5, wx.ID_ANY, wx.EmptyString, u"Select a file", u"*.log", wx.DefaultPosition, wx.DefaultSize, wx.FLP_OVERWRITE_PROMPT|wx.FLP_SAVE|wx.FLP_USE_TEXTCTRL )
		bSizer9.Add( self.logFilePicker, 0, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_wizPage5.SetSizer( bSizer9 )
		self.m_wizPage5.Layout()
		bSizer9.Fit( self.m_wizPage5 )
		self.Centre( wx.BOTH )
		
	def add_page(self, page):
		if self.m_pages:
			previous_page = self.m_pages[-1]
			page.SetPrev(previous_page)
			previous_page.SetNext(page)
		self.m_pages.append(page)
	
	def __del__( self ):
		pass
	

###########################################################################
## Class AboutDialog
###########################################################################

class AboutDialog ( wx.Dialog ):
	
	def __init__( self, parent ):
		wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"O programie", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		bSizer11 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"LinuxAnalyser 0.0.1", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText9.Wrap( -1 )
		bSizer11.Add( self.m_staticText9, 0, wx.ALL, 5 )
		
		self.m_staticText10 = wx.StaticText( self, wx.ID_ANY, u"Enterprise edition", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText10.Wrap( -1 )
		bSizer11.Add( self.m_staticText10, 0, wx.ALL, 5 )
		
		
		self.SetSizer( bSizer11 )
		self.Layout()
		bSizer11.Fit( self )
		
		self.Centre( wx.BOTH )
	
	def __del__( self ):
		pass
	


